package org.zfes.snowier.zbss.xzy.biz.solution.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.zfes.snowier.common.dao.mybatis.BaseMapper;
import org.zfes.snowier.core.data.ParamMap;
import org.zfes.snowier.core.data.Record;
import org.apache.ibatis.annotations.Param;
import org.zfes.snowier.core.data.SelectVo;
import org.zfes.snowier.zbss.xzy.biz.solution.model.AlgorithmConfigItem;
@Mapper
public interface AlgorithmConfigItemMapper extends BaseMapper<AlgorithmConfigItem>{
	
	Long selectListCount(ParamMap params);
	
	List<Record> selectMapListPage(ParamMap params);
	
	List<AlgorithmConfigItem> selectModelListPage(ParamMap params);
	
	
	AlgorithmConfigItem selectByAlgIdAndCode(@Param("algorithmId")Long algorithmId,@Param("code")String code);
	
	
	int updateStatus(@Param("id")Long id, @Param("status")Byte status);
	
    List<SelectVo> selectDropList(@Param("status")Byte status);

	List<AlgorithmConfigItem> selectByAlgorithmId(@Param("algorithmId")Long algorithmId, @Param("status")Byte status);

	AlgorithmConfigItem selectMaxChild(@Param("id")Long id);
	
	List<AlgorithmConfigItem> selectChildrenByTreeCode(@Param("treeCode")String treeCode);

	int updateChildrenStatusByTreeCode(@Param("treeCode")String treeCode, @Param("status")Byte status);

	int updateStatusByTreeCode(@Param("treeCode")String treeCode, @Param("status")Byte status);

	AlgorithmConfigItem selectByTreeCode(@Param("treeCode")String treeCode);

	AlgorithmConfigItem selectRootConfigItemById(@Param("algorithmId")Long algorithmId);
    
}
